import axios from '../AxiosConfig.js'

export const createApi = data => {
  return axios({
    method: 'post',
    url: '/api/manage/api',
    data: data
  })
}

export const deleteApi = ukId => {
  return axios({
    method: 'delete',
    url: '/api/manage/api',
    params: {"ukId": ukId}
  })
}

export const updateApi = data => {
  return axios({
    method: 'put',
    url: '/api/manage/api',
    data: data
  })
}

export const listApi = (name) => {
  return axios({
    method: 'get',
    url: '/api/manage/api/list',
    params: {"name": name}
  })
}

export const listApiByApiGroupUkId = (groupUkId) => {
  return axios({
    method: 'get',
    url: '/api/manage/api/list/group',
    params: {"groupUkId": groupUkId, "page": 1, "size": 100}
  })
}




